package cn.kevinking.ai.mcp.provider.client;

import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * @author kevinking
 * @since 20 Jul 2025
 */
@SpringBootApplication
public class BfzAiMcpClientApplication {
	public static void main(String[] args) {
		SpringApplication.run(BfzAiMcpClientApplication.class, args);
	}

	@Bean
	public ChatClient chatModel(ChatClient.Builder builder, ToolCallbackProvider toolCallbackProvider) {
		ChatClient chatClient = builder.defaultToolCallbacks(toolCallbackProvider).build();
		ChatClient.CallResponseSpec call = chatClient.prompt().system("").call();
		call.content();
		System.out.println(chatClient);
		return chatClient;
	}
}
